package com.navinfo.routeplan

import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class Constant {
    companion object {
        const val SP_DEVICE_ID = "SP_DEVICE_ID"
        const val SP_BASE_URL = "SP_BASE_URL"
        const val SP_ONCE_COUNT = "SP_ONCE_COUNT"
        const val SP_INTERVAL = "SP_INTERVAL"
        const val SP_EMAIL = "SP_EMAIL"
        const val SP_ROUTE_ERROR_SEND_MAIL = "SP_ROUTE_ERROR_SEND_MAIL"
        const val SP_WORK_TIME = "SP_WORK_TIME"
        const val SP_RETRY_INTERVAL = "SP_RETRY_INTERVAL"

        const val DEFAULT_ONCE_COUNT = 20
        const val DEFAULT_RETRY_INTERVAL = 30
        const val DEFAULT_INTERVAL = 250
        const val DEFAULT_EMAIL = "lvankun@navinfo.com"
        const val DEFAULT_ROUTE_ERROR_SEND_MAIL = true
        const val DEFAULT_WORK_TIME = "07:00-22:00"

        const val MSG_WHAT_GET_NAVI_DATA = 0x1001

        const val REQUEST_BASE_URL = "http://dtxbmaps.navinfo.com:81"
        val retrofit = Retrofit.Builder()
            .baseUrl(REQUEST_BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .build()
    }
}